package com.zhixiang.xaec.entity.system;


import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.cfg.Comment;

import com.googlecode.jsonplugin.annotations.JSON;


@Entity
@Table(name = "sys_data_fileDetail")
@Comment("文件明细表")
public class FileDetail
{
    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    private Long fileId;

    @Comment("文件名")
    private String fileName;

    @Comment("文件路径")
    @Column(length=1000)
    private String filePath;

    @Comment("上传时间")
    private Date createtime;

    @Comment("扩展名")
    private String ext;

    @Comment("文件类型")
    private String fileType;

    @Comment("文件说明")
    private String note;

    @Comment("上传者")
    private String creator;

    @Comment("状态")
    private String delFlag;

    @Comment("文件大小")
    private String fileSize;

    @Comment("时间戳 文件命名")
    private String realName;

    @Comment("文件夹")
    @ManyToOne(cascade = CascadeType.ALL)
    @JoinColumn(name="file_pk_forder", referencedColumnName="forId")
    private Forder forder;

    public Long getFileId()
    {
        return fileId;
    }

    public void setFileId(Long fileId)
    {
        this.fileId = fileId;
    }

    public String getFileName()
    {
        return fileName;
    }

    public void setFileName(String fileName)
    {
        this.fileName = fileName;
    }

    public String getFilePath()
    {
        return filePath;
    }

    public void setFilePath(String filePath)
    {
        this.filePath = filePath;
    }

    @JSON(format="yyyy-MM-dd HH:mm:ss")
    public Date getCreatetime()
    {
        return createtime;
    }

    public void setCreatetime(Date createtime)
    {
        this.createtime = createtime;
    }

    public String getExt()
    {
        return ext;
    }

    public void setExt(String ext)
    {
        this.ext = ext;
    }

    public String getFileType()
    {
        return fileType;
    }

    public void setFileType(String fileType)
    {
        this.fileType = fileType;
    }

    public String getNote()
    {
        return note;
    }

    public void setNote(String note)
    {
        this.note = note;
    }

    public String getCreator()
    {
        return creator;
    }

    public void setCreator(String creator)
    {
        this.creator = creator;
    }

    public String getDelFlag()
    {
        return delFlag;
    }

    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public String getFileSize()
    {
        return fileSize;
    }

    public void setFileSize(String fileSize)
    {
        this.fileSize = fileSize;
    }

    public String getRealName()
    {
        return realName;
    }

    public void setRealName(String realName)
    {
        this.realName = realName;
    }

    public Forder getForder()
    {
        return forder;
    }

    public void setForder(Forder forder)
    {
        this.forder = forder;
    }
    
}
